<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/css/index_work.css">
    <script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.2.min.js"></script>

</head>
<body>
<form action="addYing" method="post">
    电影名称：<input type="text" name="yname"><br>
    剧情介绍：<textarea cols="20" rows="3" name="yinfo"></textarea><br>
    导演：　　<input type="text" name="yren"><br>
    发行日期：<input type="date" name="ydate"><br>
    电影类别：
    <div id="d1">

    </div>
    <input type="submit" value="添加">
</form>

<script type="text/javascript">
    $.post("duox",function (lei) {
        for(var x in lei){
            $("#d1").append("<input type='checkbox' name='ll' value='"+lei[x].lid+"'/>"+lei[x].lname);
        }
    },"json")
</script>
</body>
</html>
